function SignInComplete() {
    if (window.opener) window.opener.location.reload();
    window.close();
}

function Register2Complete() {
    if (document.getElementById('gmail').checked) {
      window.location = user_data.gmail_url;
    } else if (document.getElementById('none').checked) {
      gmail_win = window.open(
          'http://mail.google.com/mail/signup', 'gmail_window',
          'width=750, height=500, scrollbars=1');
      gmail_win.moveTo(400, 1);
      window.location.href = user_data.none_url;
    } else if (document.getElementById('yahoo').checked) {
      yahoo_win = window.open(
          'https://www.google.com/accounts/TriggerFederatedAuthnFlow?idp=rocketmail.com',
          'yahoo_window', 'width=500, height=550, scrollbar=1');
      yahoo_win.moveTo(400, 1);
      window.location.href = user_data.yahoo_url;
    } else {
      aol_win = window.open(
          'https://www.google.com/accounts/TriggerFederatedAuthnFlow?idp=aol.com',
          'aol_window', 'width=500, height=550, scrollbar=1');
      aol_win.moveTo(400, 1);
      window.location.href = user_data.aol_url;
    }
}
